#include <iostream>
#include <cstdio>
using namespace std;

int main() {
	int n;
	cin>>n;
	if (n<=3) cout<<-1<<endl;
	else if (n%2==0) {
		cout<<1144;
		for (int i=0; i<n-4; ++i) cout<<0;
		cout<<endl;
	}
	else {
		cout<<164;
		for (int i=0; i<n-3; ++i) cout<<0;
		cout<<endl;
	}
	return 0;
}
